package com.sync.syncmasterdata;


import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.sync.syncmasterdata.product.entity.oa.ProductWorkflowDeleteEntity;
import com.sync.syncmasterdata.product.pojo.cp.InventoryForCP;
import com.sync.syncmasterdata.product.service.SyncInventoryService;
import lombok.extern.slf4j.Slf4j;
import org.json.JSONException;
import org.json.JSONObject;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.http.HttpEntity;
import org.springframework.http.HttpHeaders;
import org.springframework.http.MediaType;
import org.springframework.http.converter.StringHttpMessageConverter;
import org.springframework.web.client.RestTemplate;

import java.nio.charset.StandardCharsets;
import java.util.List;

@SpringBootTest
@Slf4j
class SyncMasterDataApplicationTests5 {

    @Autowired
    private ObjectMapper objectMapper;

    @Autowired
    private SyncInventoryService syncInventoryService;

    @Test
    public void test1(){
        try {
            List<ProductWorkflowDeleteEntity> list= syncInventoryService.getWorkflowInfoforDelete("431465");
            System.out.println("response---->" + objectMapper.writeValueAsString(list));
        } catch (JsonProcessingException e) {
            throw new RuntimeException(e);
        }

    }
}
